import { createRouter, createWebHashHistory } from "vue-router";

// 路由表
const routes = [
  {
    path: "/",
    redirect: "/a",
  },
  {
    path: "/a",
    component: () => import("../11-router-a.vue"),
  },
  {
    path: "/b",
    component: () => import("../12-router-b.vue"),
  },
];

// 路由实例
const router = createRouter({
  // hash路由
  history: createWebHashHistory(),
  routes,
});

export default router;
